TCP/IP
Connections

Introduction
User Modes
Connect Via...
Addressing
Subnet Masks
Config
Router Address
DNS
Search Paths
Hosts File
802.3
Saving Configs
Troubleshooting
Tools
For More Info
Glossary


updated:
08/11/97

 

Yes, Still More on Subnet Masks...

Crossing the boundaries
So far we've been looking at subnet masks when the division between network address and node address falls between octets, rather than within one. But let's look at subnet masks that cross the boundaries.

For example,192.192.192.2 w/mask 255.255.255.128

The subnet mask tells us that the first three octets are going to be part of the network address, since its all "1's": 255.255.255 = 11111111.11111111.11111111. So we know that 192.192.192 part of the address are part of the network number.

But in last octet (128, or 1000000), the first bit is also part of network address, last 7 are part of node address. So when we look at the last octet of 192.192.192.2, which is "2" or "00000010", the first bit, "0", is part of the net number, and the remaining 7 bits, 0000010, are part of the node address.

If we needed to find out what other addresses are on the same subnet as this particular machine (when trying to determine the correct router address, for example), we would need to make sure that the network numbers are the same, which means that the first 3 octets would be "192" and the last octet would also start with a "0", to match our example address. The range would therefore be from 0 (00000000) to 127 (011111111), exclusive. Exclusive, because node addresses can't be all zeros or all one's (all zeros refers to the network itself, and all ones is used as a broadcast address for that network, so 192.192.192.0 and 192.192.192.127 cannot be used as host addresses.

Example...IP address 192.192.192.126 is on the same network as 192.192.192.2, because the bits in the network address are identical. However, IP addresses 192.192.192.129 and 192.192.192.228 are not on the same network as 192.192.192.126, because the first bit of their last octet (which is also the last bit of the network number) is a "1", and thus their network numbers don't match that of 192.192.192.2.

Network bits Node bits
mask:255.255.255.128 11111111.11111111.11111111.1 0000000
192.192.192.2 11000000.11000000.11000000.0 0000010
192.192.192.126 11000000.11000000.11000000.0 1111110

But not:

192.192.192.129 11000000.11000000.11000000.1 0000001
192.192.192.228 11000000.11000000.11000000.1 1100100

Another example
Let's try to determine what range of IP addresses are on the same subnet as host 128.253.10.10, with subnet mask of 255.255.252.0. Here's how we could go about it:

  • Address 128.253.10.10 with mask 255.255.252.0
  • Third octet of mask is 252 or 11111100
  • This tells us that, in addition to the first two octets, the first 6 bits ofthe 3rd octet are part of the network address.
  • We know that any device on the same subnet would also have first two octets of 128.253, and that the third octet's first 6 bits must match those in IP address 128.253.10.10.
  • The third octet of the IP address is 10 or 00001010, so first 6 bits are 000010.

    The range of 8-bit numbers whose first bits are 000010 is highlighted below.:

Binary
Decimal
00000111 7
00001000
8
00001001
9
00001010
10
00001011 11
00001100
12

  • So devices with IP address 128.253.8.x through 128.253.11.x are on the same network as 128.253.10.10.

Closer Look...
Network bits Node bits
mask:255.255.252.0 11111111.11111111.111111 00.00000000
128.253.10.10 10000000.11111101.000010 10.00001010
128.253.9.100 10000000.11111101.000010 01.01100100
128.253.8.92 10000000.11111101.000010 00.01011100
128.253.11.5 10000000.11111101.000010 11.00000101
128.253.11.255 10000000.11111101.000010 11.11111111
128.253.8.0 10000000.11111101.000010 00.00000000

Note that address 128.153.11.255 would be the broadcast address for this subnet, since all node address bits are "1's". And 128.253.8.0 would refer to the subnet itself, since all node address bits are "0's".

Quiz!
Given IP address 128.253.10.10 with subnet mask of 255.255.240.0, what is range of other devices on same subnet?





Here's Why...


Back
[Intro |UserModes |ConnectVia |Addressing |Subnet Masks |Config|Routers ]DNS |Search Paths |Hosts File ]802.3 ]Saving Configs ]Troubleshooting ]Tools ]More Info ]Glossary ]
Forward